Add multi-scope regression tests for scoped-build implicit-dep detection#47
Merged
Merged
Conversation
Adds scoped_implicit_dep_multi_scope fixture (three TUs share an out-of-scope header in include/lib/shared.h, linked into a single binary) and four SCENARIOs tagged [multi-scope]: - Full initial build + scoped rebuild - Out-of-tree variant build (-B build/v1) - Scoped initial build + scoped rebuild - Full initial + noop scoped pass + scoped rebuild after edit All four assert the linked binary's bytes change after a header edit, catching both the "Nothing to do" noop mode and the "rebuilt some + linked stale" partial-rebuild mode. Verified RED: reverting the binary_search(implicit_dep_files) clause from 315b2a2 in find_changed_files_with_implicit causes all four to fail with "Nothing to do (up to date)". Refs 315b2a2. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a regression test fixture and four
[multi-scope]scenarios for the scoped-build implicit-dependency fix landed in 315b2a2.The fixture (
test/e2e/fixtures/scoped_implicit_dep_multi_scope) sets up three TUs (alpha,beta,main) that share an out-of-scope header atinclude/lib/shared.h, linked into a single binary atapp/app. Mirrors the production iOS bug shape (multi-arg scoped invocation, header outside any scope dir).Four scenarios in
test/unit/test_e2e.cpp:-B build/v1) — variant-aware pathAll four assert
binary_before \!= binary_afteron the linked artifact, which catches both the original "Nothing to do (up to date)" failure mode and the "rebuilt some + linked stale" partial-rebuild mode described inpup-header-detection-bug.md's 2026-05-15 follow-up.RED verification
Reverted the
binary_search(implicit_dep_files…)clause fromfind_changed_files_with_implicit(the one-line fix added in 315b2a2). All four scenarios fail immediately atREQUIRE_FALSE(result.is_noop())withNothing to do (up to date).— the exact symptom from the bug doc. Fix restored, all green. The tests genuinely exercise the bug.Test plan
make test— full suite passes (461 cases, 23 622 assertions)./build/test/unit/putup_test "[multi-scope]"— 4 cases / 30 assertionsmake formatcleanRefs 315b2a2.
🤖 Generated with Claude Code